// 测试环境设置
import { config } from '@vue/test-utils'

// 全局配置
config.global.stubs = {
  // 模拟全局组件
  'el-button': true,
  'el-table': true,
  'el-table-column': true,
  'el-form': true,
  'el-form-item': true,
  'el-input': true,
  'el-select': true,
  'el-option': true,
  'el-date-picker': true,
  'el-pagination': true,
  'el-dialog': true,
  'el-card': true,
  'el-empty': true,
  'el-tooltip': true,
  'el-dropdown': true,
  'el-dropdown-menu': true,
  'el-dropdown-item': true,
  'el-checkbox-group': true,
  'el-checkbox': true,
  'el-radio-group': true,
  'el-radio': true,
  'el-progress': true,
  'van-nav-bar': true,
  'van-search': true,
  'van-tabs': true,
  'van-tab': true,
  'van-list': true,
  'van-pull-refresh': true,
  'van-button': true,
  'van-form': true,
  'van-field': true,
  'van-radio-group': true,
  'van-radio': true,
  'van-checkbox-group': true,
  'van-checkbox': true,
  'van-empty': true,
  'van-progress': true,
  'van-icon': true
}

// 模拟全局属性
config.global.mocks = {
  $t: (key) => key,
  $route: {
    params: {},
    query: {}
  },
  $router: {
    push: vi.fn(),
    replace: vi.fn(),
    back: vi.fn()
  },
  $modal: {
    msgSuccess: vi.fn(),
    msgError: vi.fn(),
    msgWarning: vi.fn(),
    confirm: vi.fn()
  }
} 